


const ORDER_STATUS = [
	{
		state: 0,
		// status: '待付款',
		status: '待确认',
		image: '/static/order/daifukuan.png',
		btText: ''
	},{
		state: 1,
		status: '待发货',
		image: '/static/order/daifahuo.png',
		btText: ''
	},{
		state: 2,
		status: '待收货',
		image: '/static/order/daishouhuo.png',
		btText: ''
	},{
		state: 3,
		status: '待评价',
		image: '/static/order/daipingjia.png',
		btText: ''
	},{
		state: 4,
		status: '已完成',
		image: '/static/order/yiwancheng.png',
		btText: ''
	},{
		state: 5,
		status: '已取消',
		image: '/static/order/yiquxiao.png',
		btText: ''
	}
]

const PAY_ORDER_STATUS = [
	{
		state: 0,
		status: '待付款',
		image: '/static/order/daifukuan.png',
		btText: ''
	},{
		state: 1,
		status: '待到账',
		image: '/static/order/daidaozhang.png',
		btText: ''
	},{
		state: 2,
		status: '已到账',
		image: '/static/order/daishouhuo.png',
		btText: ''
	},{
		state: 4,
		status: '支付失败',
		image: '/static/order/yijujue.png',
		btText: ''
	},{
		state: 5,
		// status: '支付失败',
		// image: '/static/order/yijujue.png',
		status: '已取消',
		image: '/static/order/yiquxiao.png',
		btText: ''
	}
]

const AFTER_STATUS = [
	{
		state: -3,
		status: '已隐藏',
		image: '/static/order/yijujue.png',
		btText: ''
	},
	{
		state: -2,
		status: '已拒绝',
		image: '/static/order/yijujue.png',
		btText: ''
	},
	{
		state: -1,
		status: '已撤回',
		image: '/static/order/yiquxiao.png',
		btText: ''
	},{
		state: 0,
		status: '待审核',
		image: '/static/order/daidaozhang.png',
		btText: ''
	},{
		state: 1,
		status: '待退款',
		image: '/static/common/daituihuo.png',
		btText: ''
	},{
		state: 2,
		status: '已完成',
		image: '/static/order/yiwancheng.png',
		btText: ''
	}
]

const PAYMENT_METHOD = [
	{
		value: 0,
		text: '微信支付'
	},
	// {
	// 	value: 1,
	// 	text: '支付宝支付',
	// 	icon:"icon-alipay"
	// },
	// {
	// 	value: 2,
	// 	text: '银联支付'
	// },
	{
		value: 3,
		text: '线下支付'
	},
	// {
	// 	value: 4,
	// 	text: '月结支付'
	// },
	{
		value: 11,
		text: '支付宝支付'
	},
	// {
	// 	value: 12,
	// 	text: '微信支付'
	// },
]
import { defineStore } from 'pinia'
// 第一个参数是你的应用中 Store 的唯一 ID。
export const orderStore = defineStore('order', {
	state: () => ({
		paymentStatus: false,
		orderStatus: ORDER_STATUS, // 订单状态
		afterStatus: AFTER_STATUS, // 订单状态
		payorderStatus:PAY_ORDER_STATUS,
		paymentMethod: PAYMENT_METHOD, // 支付方式
	}),
	actions: {
		setPaymentStatus(status) {
			this.paymentStatus = status
		}
	}
})
// const getters = {
// 	orderStatus: state => {
// 		return state.orderStatus
// 	},
// 	payorderStatus: state => {
// 		return state.payorderStatus
// 	}
// }
